﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Trirand.Web.Mvc;
using System.Web.UI.WebControls;

namespace MLGest.Models
{
    public class VentasModel
    {

        public VentasModel()
            {
                OrdersGrid = new JQGrid
                {
                    Columns = new List<JQGridColumn>()
                                 {
                                     new JQGridColumn { DataField = "IdCaja", CssClass = "font-size:4px;", 
                                                        // always set PrimaryKey for Add,Edit,Delete operations
                                                        // if not set, the first column will be assumed as primary key

                                                        PrimaryKey = true,
                                                        Editable = false,
                                                        Width = 50 },
                                     new JQGridColumn { DataField = "FechaCaja", 
                                                        Editable = true,
                                                        Width = 100, 
                                                        DataFormatString = "{0:d}" },
                                     new JQGridColumn { DataField = "CajaInfo1", 
                                                        Editable = true,
                                                        Width = 220 },
                                     new JQGridColumn { DataField = "CajaInfo2", 
                                                        Editable = true,
                                                        Width = 75 },
                                     new JQGridColumn { DataField = "CajaInfo3",
                                                        Editable =  true
                                                      }                                     
                                 },
                    Width = Unit.Pixel(760)
                };
                JQGridColumnFormatter objFormatter = new JQGridColumnFormatter();
                objFormatter = OrdersGrid.Columns[0].Formatter;
                OrdersGrid.ToolBarSettings.ShowRefreshButton = true;
            }

            public JQGrid OrdersGrid { get; set; }
        
    }
}